package com.cuitrip.util.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;

import com.cuitrip.app.util.FontManager;

/**
 * Created by MiJack on 2015/12/21.
 */
public abstract class CTRecyclerAdapter<VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {

    public abstract VH newViewHolder(ViewGroup parent, int viewType);

    @Override
    final public VH onCreateViewHolder(ViewGroup parent, int viewType) {
        VH holder = newViewHolder(parent, viewType);
        FontManager.resetViewFont(holder.itemView, true);
        return holder;
    }

}